package com.own.business.resource.core.model;

import com.own.business.resource.core.model.base.BaseUploadModel;
import com.own.component.common.exception.BusinessSimpleException;
import com.own.exception.ExceptionEnum;
import lombok.extern.slf4j.Slf4j;

import java.io.InputStream;

/**
 * UploadModel
 *
 * @author chenxueli
 * @date 2023-07-07 16:44:41
 */
@Slf4j
public class UploadFileNameModel extends BaseUploadModel {

    /**
     * 文件上传
     *
     * @param filename 文件名称
     */
    public UploadFileNameModel(String filename) {
        this.setOldFileName(filename);
        this.init();
    }

    /**
     * 设置文件流信息
     *
     * @return 文件流信息
     */
    @Override
    public InputStream setInputStream() {
        throw new BusinessSimpleException(ExceptionEnum.Resource.INPUT_STREAM_NOT_SUPPORT);
    }

}
